home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / zvt1_11u.lha / ZVT / ExampleScripts / TrapFaxScript.rexx < prev    next >
OS/2 REXX Batch file  |  1995-11-17  |  1KB  |  67 lines

  1. /* FaxScript For TrapFax And ZVT                */
  2.  
  3. options results
  4.  
  5. signal on break_c
  6. signal on halt
  7. signal on syntax
  8.  
  9. options failat 50
  10.  
  11. say "FaxScript For TrapFax And ZVT"
  12.  
  13. /*
  14.  * TrapFax must be running and in a 'quiet' status.
  15.  * Maybe you have to set the Assign 'TrapFax:' to this directory
  16.  * where TrapFax resides.
  17.  */
  18.  
  19.  address command 'cd TrapFax:'
  20.  address command 'TFaxDoor IMMEDIATE >CON:0/0/640/100/TFax'
  21.  setvars(0)
  22.  exit
  23.  
  24. /*
  25.  * Maybe I'll put some more sophisticated check here... At this time
  26.  * I have no idea how to check the return values...
  27.  * Up to this point this script does nothing else but receiving the fax.
  28.  */
  29.  
  30. setVars: procedure
  31.     parse arg error
  32.  
  33.     if error=0 then
  34.         do
  35.         address zvt.1 'setlength ' || 1
  36.         address zvt.1 'setname ' || unknown_file
  37.         end
  38.     else        /* No fax here. */
  39.         do
  40.         address zvt.1 'setlength ' || 0
  41.         address zvt.1 'setname no_file'
  42.         end
  43.     return rc
  44.  
  45.  
  46. error:
  47.     call Debug("Error" rc "at line" sigl)
  48.     return rc
  49.  
  50. break_c:
  51. halt:
  52.     call Debug("CTRL_C at line" sigl)
  53.     exit 20
  54.  
  55. syntax:
  56.     call Debug("Syntax error" rc "at line" sigl)
  57.     return rc
  58.  
  59.  
  60. Debug: procedure
  61.     parse arg info
  62.  
  63.     firstLine = sourceline(1)
  64.     parse var firstLine '/*' title '*/'
  65.     say title ':' info
  66.     return
  67.